package com.data.center.entity.mongo;


import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Document(collection = "mongo_expert")
public class MongoExpert {


        @Id // MongoDB 自动生成的唯一标识符
        private String id;

        @Field("expert_id")
        private String expertId; // 专家ID（关联科技人才表）

        @Field("availability")
        private String availability; // 可用性状态（可抽取-1、不可抽取-0）

        @Field("creator")
        private String creator; // 创建人（关联业务人员表）

        @Field("creation_time")
        private LocalDateTime creationTime; // 创建时间

        // 全参构造函数
        public MongoExpert(String expertId, String availability, String creator, LocalDateTime creationTime) {
            this.expertId = expertId;
            this.availability = availability;
            this.creator = creator;
            this.creationTime = creationTime;
        }

        @Override
        public String toString() {
            return "MongoExpert{" +
                    "id='" + id + '\'' +
                    ", expertId='" + expertId + '\'' +
                    ", availability='" + availability + '\'' +
                    ", creator='" + creator + '\'' +
                    ", creationTime=" + creationTime +
                    '}';
        }

}
